package com.android.pingpong;

/*import android.content.Context;
import android.content.SharedPreferences;*/
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;

public class SettingsScreen extends PreferenceActivity implements Preference.OnPreferenceChangeListener
{
    /* Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);        

        // Load the preferences from an XML resource
        addPreferencesFromResource(R.xml.preferences);
        EditTextPreference Bspeed = (EditTextPreference)this.findPreference("pref_ball_speed");
        Bspeed.setSummary(Bspeed.getText());
        Bspeed.setOnPreferenceChangeListener(this);
        
        EditTextPreference Rspeed = (EditTextPreference)this.findPreference("pref_roc_speed");
        Rspeed.setSummary(Rspeed.getText());
        Rspeed.setOnPreferenceChangeListener(this);
    }

    public boolean onPreferenceChange(Preference preference, Object newValue)
    {
        preference.setSummary((CharSequence)newValue);

        return true;
    }
}